//
//  BaseImageV.h
//  ZITHER
//
//  Created by weixin on 2018/10/15.
//  Copyright © 2018年 weixn. All rights reserved.
//

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

/** 添加点击事件 */
//UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] init];
//
//[[tap rac_gestureSignal] subscribeNext:^(__kindof UIGestureRecognizer * _Nullable x) {
//    if (self.showBigPic) {
//        self.showBigPic(self.indexPath,imageV.tag-100);
//    }
//}];
//    self.userInteractionEnabled = YES;
//[imageV addGestureRecognizer:tap];

@interface BaseImageV : UIImageView<QMUIImagePreviewViewDelegate>

-(instancetype)initializeFrame:(CGRect)frame contentMode:(NSInteger)contentMode;
+(instancetype)initCustom:(CGRect)frame contentMode:(NSInteger)contentMode;
-(void)sd_setImage:(NSString*)url;

-(RACSignal *)addTag;

-(void)setRound:(CGFloat)width;


//加载国旗
-(void)sd_setImageFlags:(NSString*)url;
//图片变灰
- (void)setImageChangeGray:(NSString *)Url;


@property(nonatomic, strong) QMUIImagePreviewViewController *imagePreviewViewController;

-(void)showBigImage:(NSInteger)selectIndex;
-(void)addBigImage;

- (UIImage *)scaleToSize:(UIImage *)img size:(CGSize)newsize;
@end

NS_ASSUME_NONNULL_END
